﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlCalendar.ascx.cs" Inherits="Ctl_ctlCalendar" %>
<%@ Register src="ctlTaskEditor.ascx" tagname="ctlTaskEditor" tagprefix="uc1" %>
    
<asp:UpdatePanel runat ="server"  ID ="updcalendar">
<ContentTemplate >

<table width ="100%" cellpadding ="0" cellspacing ="0"  >
    <asp:ListView ID="lvCalendar" runat="server" onitemcommand="lvCalendar_ItemCommand" 
        onitemediting="lvCalendar_ItemEditing" 
        onitemupdating="lvCalendar_ItemUpdating" 
        onitemdatabound="lvCalendar_ItemDataBound">
<LayoutTemplate  >  
    <tr runat="server" id="itemPlaceholder" ></tr>              
 </LayoutTemplate>

<ItemTemplate >
 <tr>
 <td onmouseover ="this.style.backgroundColor='rgb(240, 240, 240)'" onmouseout ="this.style.backgroundColor=''">  
    <table width="100%" cellpadding ="0" cellspacing ="0" >
         <tr >
    <td  style="width :20px; text-align :left">            
        <asp:ImageButton ID=btnTogglegroup runat="server" OnCommand ="ImageButton3_Click" CommandArgument = <%# Eval("DateForNewTask").ToString()%>  Visible =<%# GetGroupToggleIsVisible(Eval("txtTerm").ToString()) %>    ImageUrl ="~/images/grd_plus.gif" />  
    </td>     
         
    <td style="width :70px; border-right-style: groove;	border-right-width:thin; text-align :center ">
        <asp:Button ID="btnEditTask"  Text =<%# TermText(Eval("txtTerm").ToString()) %>  ToolTip="Добавить задачу"  CommandArgument= <%# Eval("DateForNewTask").ToString()%>  OnClick ="btnAddTask_Click" CssClass ="btn"  runat="server"  />                
    </td>
      
   
    <td class =<%# (string)Eval ("RowCSS")%> style="width :30px; text-align :left">        
        <asp:ImageButton ID=ImageButton2 runat="server" CommandName ="Edit"  Visible =<%# !(bool)Eval("iHaveTask")   %> ImageUrl ="~/images/grd_plus.gif" /> &nbsp         
    </td>
        
    
    <td class =<%# (string)Eval ("RowCSS")%> >
           <%# (string)Eval("s_TaskContent")%>         
    </td>
    
    <td class =<%# (string)Eval ("RowCSS")%> style="width :15px; text-align:left ">
         &nbsp
    </td>
    
    <td class =<%# (string)Eval ("RowCSS")%> style="width :80px; text-align:left " >
         <%# ((string)Eval("s_Type")==string.Empty?"&nbsp":(string)Eval("s_Type"))  %>             
    </td>
       
    <td class =<%# (string)Eval ("RowCSS")%> style="width :170px;text-align:left" >                
        <%# ((string)Eval("s_Client") == string.Empty ? "&nbsp" : (string)Eval("s_Client"))%>    
        
        
    </td>
    
    <td class =<%# (string)Eval ("RowCSS")%> style="width :45px; text-align:left "  >
    <asp:UpdatePanel ID=UpdatePanel1 runat ="server"  >
    <ContentTemplate >    
        <%# (string)Eval("s_Closed")%>        
       </ContentTemplate>
     </asp:UpdatePanel>
    </td>
    
    <td class =<%# (string)Eval ("RowCSS")%> style="width :30px; text-align :right" >         
        &nbsp <asp:ImageButton ID=ImageButton1 Visible =<%# !(bool)Eval("iHaveTask")%> OnClientClick ="OnDeleteClick();"  CommandArgument=<%# (string)Eval("TaskId")%>   OnClick ="RemoveTask_Click" ImageUrl ="~/images/trash.png" runat="server" />     
    </td>
 
 </tr>
 </table>
 </td> 
 </tr> 
 </ItemTemplate>
 
<EditItemTemplate >
 <tr>
<td class="EditRowBackGround" >  
    <table width="100%" cellpadding ="0" cellpadding ="0" >
    <tr >
    <td class ="grd_td_item" style="width :84px; text-align :center ">
        <%# Eval("txtTerm").ToString() %>  
    </td>
    <td class ="grd_td_item">
        <uc1:ctlTaskEditor ID="ctlTaskEditor1" TaskID=<%#  (string)Eval("TaskId")%> runat="server" />          
    </td>
    </tr>
    </table> 
</td> 
</tr>
 </EditItemTemplate>     
</asp:ListView>
</table>

<asp:HiddenField ID="hfAnchorDay" runat="server" />
<asp:HiddenField ID="hfTerm" runat="server" />
<asp:HiddenField ID="hfEmplID" runat="server" />
<asp:HiddenField ID="hfClientID" runat="server" />

</ContentTemplate>
</asp:UpdatePanel> 
 
 





 
 





 
 

